<%--
	author:yaren
	time:2012/4/21 23:42:37
--%>



<%@page language="java" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@taglib uri="TowkerTagLib" prefix="rbac"%>
<%@include file="/commons/include/html_doctype.html"%>
<html>
<head>
	<title>明细</title>
	<%@include file="/commons/include/getById.jsp" %>
	<script type="text/javascript">
$(function(){
	
	   rawStock( $("#attr").val() );
});
function rawStock( val ){
	 var jprice_tile =   $("#jprice_tile") ;
	  var jprice =  $("#jpricetd");
	 
 if ( val == 4 ){
	 //  raw_stock();
	   $("#isnot_raw_stock").hide();
	   $("#tprice_title").hide();
	   $("#tpricetd").hide();
	   jprice.show();
	   jprice_tile.show();
	 // $("#raw_stock").append('<td class="form_title" id="jprice_tile">计划单价：</td><td class="form_input" id="jpricetd"><input type="text" id="jprice" name="jprice" value="" /></td>'); 
 }else{
	 //  isnot_raw_stock();
	   $("#isnot_raw_stock").show();
	   $("#tprice_title").show();
	   $("#tpricetd").show();
	     jprice_tile.hide(); 
		  jprice.hide();
	 //  $("#lasttr").prepend('<td class="form_title" id="jprice_tile">计划单价：</td><td class="form_input" id="jpricetd"><input type="text" id="jprice" name="jprice" value="" /></td>'); 
 }
}
	</script>
</head>
<body>
<table border="0" cellspacing="0" cellpadding="0" class="listLogo">
	<tr>
		<td class="title">物料明细</td>
		<td>
			<div class="menuTool">
				<a class="back" onClick="javascript:window.history.back();return false;" href="#">返回</a>
			</div>
		</td>
	</tr>
</table>
<div class="line"></div>
<table border="0" cellspacing="1" cellpadding="0" class="listTable">
	<tr>
		<td class="form_title">品种代码：</td>
		<td class="form_input">${fn:escapeXml(po.goods_sn)}</td>
		
		<td class="form_title">品种名称：</td>
		<td class="form_input">${fn:escapeXml(po.goods_name)}</td>
	<td class="form_title">品种型号：</td>
		<td class="form_input">${fn:escapeXml(po.spec)}</td>
	</tr>
	<tr>
		<td class="form_title">品种大类号：</td>
		<td class="form_input">
		<c:if test="${po.type_id==1}">原材料</c:if>
		<c:if test="${po.type_id==2}">自制半成品</c:if>
		<c:if test="${po.type_id==3}">对外销售产品</c:if>
		</td>
		<td class="form_title">品种小类号：</td>
		<td class="form_input">${fn:escapeXml(po.class_id)}</td>
	
		
		<td class="form_title">产品性质：</td>
		<td class="form_input">
		<c:if test="${po.attr==1 }">常规产品</c:if> 
		<c:if test="${po.attr==2 }">定做产品</c:if> 
		<c:if test="${po.attr==3 }">外购商品</c:if> 
		<c:if test="${po.attr==4 }">原材料</c:if> 
		</td>
	</tr>
		<tr id="raw_stock">
		 <td class="form_title">计量单位：</td>
	  <td class="form_input">${fn:escapeXml(po.unit)}</td>
		<td class="form_title">单位重量：</td>
		<td class="form_input">${fn:escapeXml(po.weight)}</td>
		 <td class="form_title"  id="tprice_title">调拨价：</td>
	    <td class="form_input" id="tpricetd">${fn:escapeXml(po.tprice)}</td>
		<td class="form_title"  style="display: none" id="jprice_tile">计划单价：</td>
		<td class="form_input"  style="display: none" id="jpricetd">${fn:escapeXml(po.jprice)}</td>
  </tr>
	<tr id="isnot_raw_stock">
	  <td class="form_title">产品商业价：</td>
	  <td class="form_input">${fn:escapeXml(po.bprice)}</td>
	  	  <td class="form_title">零售价：</td>
	  <td class="form_input">${fn:escapeXml(po.sprice)}</td>
	  <td class="form_title">批发价：</td>
	  <td class="form_input">${fn:escapeXml(po.wprice)}</td>

  </tr>
	<tr id="lasttr">
	  <td class="form_title">是否需要报警：</td>
	  <td class="form_input">${fn:escapeXml(po.alarm)}</td>
	  <td class="form_title">库存报警的最低库存量：</td>
	  <td class="form_input">${fn:escapeXml(po.stock_tips)}</td>
 	  <td class="form_title">当前库存量：</td>
	  <td class="form_input">${fn:escapeXml(po.stock)}</td>
  </tr>
</table>
<input type="hidden" value="${po.attr}" id="attr">
</body>
</html>
